<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_course_schedule".
 *
 * @property string $id
 * @property string $schedule_name
 * @property string $t_course_id 开课课程id
 * @property string $teacher_id 开课教师id
 * @property string $date 上课时间
 * @property string $week 星期
 * @property string $create_by
 * @property string $create_time
 * @property string $update_by
 * @property string $update_time
 * @property int $del_flag
 */
class TCourseSchedule extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_course_schedule';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'create_time', 'update_time', 'del_flag'], 'required'],
            [['date', 'create_time', 'update_time'], 'safe'],
            [['del_flag'], 'integer'],
            [['id', 't_course_id', 'teacher_id', 'create_by', 'update_by'], 'string', 'max' => 36],
            [['schedule_name', 'week'], 'string', 'max' => 255],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'schedule_name' => 'Schedule Name',
            't_course_id' => 'T Course ID',
            'teacher_id' => 'Teacher ID',
            'date' => 'Date',
            'week' => 'Week',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
        ];
    }
}
